import random

arr = []

# 生成中奖号码
for a in range(8):
    arr.append(random.randint(1, 33))
    # print(arr[a], end="\t")

# 买入号码
nums = input("\n下注请输入8组数字，用空格隔开：")
arr1 = [int(a) for a in nums.split()]
print("您买入的号码为：", arr1)

# 判断中奖情况
num = 0
for a in range(8):
    if arr[a] == arr1[a]:
        num += 1
message = ''
if num < 4:
    message = "很遗憾！未中奖"
elif num < 5:
    message = "四等奖"
elif num < 6:
    message = "三等奖"
elif num < 7:
    message = "二等奖"
else:
    message = "一等奖"
print(message)
print("本期彩号", arr)
